import request from '@/utils/request'

const baseURL = '/admin/seckillOrder'

// 获取秒杀订单列表
export const getSeckillOrderList = (params) => {
  return request.get(`${baseURL}/list`, {
    params: {
      pageNum: params.pageNum || 1,
      pageSize: params.pageSize || 10
    }
  })
}

// 发货
export const deliverSeckillOrder = (id) => {
  return request.post(`${baseURL}/deliver/${id}`)
}

// 退款
export const refundSeckillOrder = (id) => {
  return request.post(`${baseURL}/refund/${id}`)
}

// 取消订单
export const cancelSeckillOrder = (id) => {
  return request.post(`${baseURL}/cancel/${id}`)
} 